Skip to content

Conversation

ycz1234
Copy link

@ycz1234 ycz1234 commented Sep 20, 2024

This pull request change Floyd.cpp to floyd-warshall algorithm in the graph module. The floyd-warshall algorithm is used to find the shortest paths between all pairs of vertices in a weighted graph. This implementation provides an efficient way to solve the shortest path problem for all pairs of vertices.

1.Adding negative power ring judgement.
2.Improve the name---Floyd to floyd_warshall (both the function name and file name)
3.Some tiny improvements

@realstealthninja
Copy link
Collaborator

Please use the given pull request format.

@@ -0,0 +1,91 @@
/**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are there two files

* 0 3 7 7
* 7 0 4 4
* 3 6 0 6
* 1 4 2 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add @author tag inside your header comment

#include <limits>

const int INF = std::numeric_limits<int>::max();

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be inside a graph namespace

*/
void test() {
int N, M;
std::cout << "Enter the number of vertices and edges: ";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests should have predefined cases not user defined cases.
add cases for the following

  1. negative numbers
  2. empty array
  3. all numbers being INF

/**
* @brief Main function that starts the program by invoking the test function.
*
* This function serves as the entry point of the program, calling the `test` function
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check other files on how the main function is documented

@realstealthninja realstealthninja added awaiting modification Do not merge until modifications are made requested changes changes have been requested Proper Documentation Required requested to write the documentation properly duplicate duplicate of another pull request labels Oct 1, 2024
@realstealthninja
Copy link
Collaborator

duplicate of #2708

Copy link
Contributor

github-actions bot commented Nov 1, 2024

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Nov 1, 2024
Copy link
Contributor

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

@github-actions github-actions bot closed this Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting modification Do not merge until modifications are made duplicate duplicate of another pull request Proper Documentation Required requested to write the documentation properly requested changes changes have been requested stale Author has not responded to the comments for over 2 weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants